package com.dean.entity;

/**
 * @ClassName DeanExportInfo
 * @Description 数据导出信息实体类
 * @Author dean
 * @Date 2021/11/16 14:26
 */
public class DeanExportInfo {

    /**
     * 每次读取数据库记录数
     */
    private Integer fetchSize;

    /**
     * csv 导入导出分割符
     */
    private String delimiter;

    /**
     * csv 文本限定符
     */
    private Character quote;

    /**
     * 执行插入sql
     */
    private String querySql;

    /**
     * 导入文件路径
     */
    private String filePath;
    /**
     * 数据库连接名
     */
    private String connName;

    public String getConnName() {
        return connName;
    }

    public void setConnName(String connName) {
        this.connName = connName;
    }

    public String getFilePath() {
        return filePath;
    }

    public void setFilePath(String filePath) {
        this.filePath = filePath;
    }

    public String getQuerySql() {
        return querySql;
    }

    public void setQuerySql(String querySql) {
        this.querySql = querySql;
    }


    /**
     * 文件字符集
     * @return
     */
    private String charSet;

    public String getCharSet() {
        return charSet==null?"UTF-8":charSet;
    }

    public void setCharSet(String charSet) {
        this.charSet = charSet;
    }

    public void setQuote(Character quote) {
        this.quote = quote;
    }

    public String getDelimiter() {
        return delimiter;
    }

    public Integer getFetchSize() {
        return fetchSize;
    }

    public void setFetchSize(Integer fetchSize) {
        this.fetchSize = fetchSize;
    }

    public Character getQuote() {
        return quote;
    }

    public void setDelimiter(String delimiter) {
        this.delimiter = delimiter;
    }

    @Override
    public String toString() {
        return "DeanExportInfo{" +
                "fetchSize=" + fetchSize +
                ", delimiter='" + delimiter + '\'' +
                ", quote=" + quote +
                ", querySql='" + querySql + '\'' +
                ", filePath='" + filePath + '\'' +
                ", connName='" + connName + '\'' +
                ", charSet='" + charSet + '\'' +
                '}';
    }
}
